Redesign exception display with improved formatting and structure - #444
Merged
ocots merged 1 commit intoJun 9, 2026
Merged
Conversation
- Refactored display.jl to use modular rendering functions - Added structured exception context display with sections - Improved error message formatting with clear hierarchy - Updated tests to cover new display behavior - Updated documentation in exceptions.md and index.md
This was referenced Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR redesigns the exception display system to provide a cleaner, more structured, and colorblind-friendly output format.
Key Changes
Display Format Redesign
│separatorsPreconditionError → configure! MyModule.jl:42)ExtensionErrorbased onweakdepsCode Refactoring
_format_user_friendly_errorinto modular rendering functions:_build_primary_pairsfor type-specific field extraction_render_fieldfor consistent field formatting_render_secondary_pairsfor optional fields_render_user_locationfor caller tracking_dim,_bold,_red,_yellow,_green_format_diagnosticforAmbiguousDescriptionwith human-readable expansionsDocumentation Updates
docs/src/guide/exceptions.mdwith new display examplesdocs/src/index.mdto useshowerrorinstead ofprintlncontextfield fromParsingErrordocumentation (was already removed from type)Test Updates
Benefits
Testing
All tests in
test/suite/exceptions/test_exception_display.jlandtest/suite/exceptions/test_exceptions.jlpass.